Class SimFileImpl

java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.SimFileImpl
All Implemented Interfaces:
IPCObject, SimFile
Direct Known Subclasses:
DirectoryImpl

public class SimFileImpl extends IPCObjectImpl implements SimFile
Information provided by the PKI file:

    \class SimFile
    
    \brief SimFile holds and manipulates files on file systems.
    
    \example network().getDevice("Router0").getProcess("FileManager").getFileSystem("flash:").getFileAt(0)
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Information provided by the PKI file:
      
          \brief Returns the filename of the file.
          
          \return string, the filename of the file.
          
              
      Specified by:
      getName in interface SimFile
      Returns:
      String Returns a String
    • getPermission

      public FilePermission getPermission()
      Information provided by the PKI file:
      
          \brief Returns the permissions of the file.
          
          \return     FilePermission, the permissions of the file.
          Permissions:        eExecute = 1,
          eWrite = 2,
          eRead = 4
          
              
      Specified by:
      getPermission in interface SimFile
      Returns:
      FilePermission Returns a FilePermission
    • isExecutable

      public boolean isExecutable()
      Information provided by the PKI file:
      
          \brief Returns true if the file is executable, otherwise false.
          
          \return bool, true if the file is executable, otherwise false.
          
              
      Specified by:
      isExecutable in interface SimFile
      Returns:
      boolean Returns a boolean
    • isWritable

      public boolean isWritable()
      Information provided by the PKI file:
      
          \brief Returns true if the file is writable, otherwise false.
          
          \return bool, true if the file is writable, otherwise false.
          
              
      Specified by:
      isWritable in interface SimFile
      Returns:
      boolean Returns a boolean
    • isReadable

      public boolean isReadable()
      Information provided by the PKI file:
      
          \brief Returns true if the file is readable, otherwise false.
          
          \return bool, true if the file is readable, otherwise false.
          
              
      Specified by:
      isReadable in interface SimFile
      Returns:
      boolean Returns a boolean
    • isDirectory

      public boolean isDirectory()
      Information provided by the PKI file:
      
          \brief Returns true if the file is a directory, otherwise false.
          
          \return bool, true if the file is a directory, otherwise false.
          
              
      Specified by:
      isDirectory in interface SimFile
      Returns:
      boolean Returns a boolean
    • getSize

      public int getSize()
      Information provided by the PKI file:
      
          \brief Returns the filesize of the file.
          
          \return int, the filesize of the file.
          
              
      Specified by:
      getSize in interface SimFile
      Returns:
      int Returns a int
    • getParent

      public Directory getParent()
      Information provided by the PKI file:
      
          \brief Returns the parent directory.
          
          \return Directory, the parent directory.
          
              
      Specified by:
      getParent in interface SimFile
      Returns:
      Directory Returns a Directory
    • getAbsPath

      public String getAbsPath()
      Information provided by the PKI file:
      
          \brief Returns absolute path of the SimFile object.
          
          \return string, absolute path of the SimFile object.
          
              
      Specified by:
      getAbsPath in interface SimFile
      Returns:
      String Returns a String
    • setTextContent

      public void setTextContent(String content, boolean bCheckPermission)
      Information provided by the PKI file:
      
          \brief set the content of the SimFile object.
          
          \param content, the content string to set to the SimFile.
          \param bCheckPermission, true if check the permission of the file, otherwise false.
          
              
      Specified by:
      setTextContent in interface SimFile
      Parameters:
      content - Takes in a parameter of content
      bCheckPermission - Takes in a parameter of bCheckPermission
    • getContent

      public FileContent getContent(boolean bCheckPermission)
      Information provided by the PKI file:
      
          \brief Returns the file content of the SimFile.
          
          \param bCheckPermission, true if check the permission of the file, otherwise false.
          
          \return FileContent, the file content of the SimFile.
          
              
      Specified by:
      getContent in interface SimFile
      Parameters:
      bCheckPermission - Takes in a parameter of bCheckPermission
      Returns:
      FileContent Returns a FileContent